#!/usr/bin/env python3

from pylab import *

fp = open('weights_dcds.txt', 'w')

# 1MHz
# 26Mhz
#w_size = 22

#for cnt in range(w_size):
#    for os in range(16):
#        if cnt >=7 and cnt <= 9:
#            w = 1./3
#        elif cnt >=16 and cnt <= 18:
#            w = -1./3
#        else:
#            w = 0
#
#        fp.write('%12.8f '%(w)) 
#
#    fp.write('\n')

# 1Mhz
# 39MHz
w_size = 147

for cnt in range(w_size):
    for os in range(16):
        if os==8:
            if cnt >=30 and cnt <= 64:
                w = 1./35
            elif cnt >=100 and cnt <= 132:
                w = -1./33
            else:
                w = 0
        else:
            if cnt >=30 and cnt <= 64:
                w = 1./35
            elif cnt >=100 and cnt <= 132:
                w = -1./33
            else:
                w = 0

        fp.write('%12.8f '%(w))

    fp.write('\n')







# 200kHz
#w_size = 110

#for cnt in range(w_size):
#    for os in range(16):
#        if cnt >=10 and cnt <= 50:
#            w = 1./41
#        elif cnt >=60 and cnt <= 100:
#            w = -1./41
#        else:
#            w = 0

#        fp.write('%12.8f '%(w)) 

#    fp.write('\n')

fp.close()

